OBJ=$(patsubst %.c, %.o, $(wildcard *.c))

CFLAGS += -g -Wall  -D_DEBUG
LDLIBS += -levent -llua -ltokyocabinet

all : run 

run : $(OBJ)
	g++ -o $@ $^ $(LDLIBS) 

%.o : %.c
	g++ -c -o $@ $< $(CFLAGS)

.PHONY : clean tag distclean

clean :
	@rm -vf *.o

distclean : clean
	@rm -vf lua_server_host
